<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class IDS_Init</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class IDS_Init</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Framework initiation</p>
<p class="description"><p>This class is used for the purpose to initiate the framework and inhabits  functionality to parse the needed configuration file.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
				<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
				<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> Release: $Id:Init.php 517 2007-09-15 15:04:13Z mario $</li>
				<li><span class="field">copyright:</span> 2007 The PHPIDS Groupup</li>
				<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
				<li><span class="field">since:</span> Version 0.4</li>
				<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Init.php.html">/Init.php</a> (line <span class="field">51</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$config" title="details" class="var-name">$config</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																				<div class="method-definition">
					static 						<span class="method-result">object</span>
										<a href="#init" title="details" class="method-name">init</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$configPath</span> = <span class="var-default">null</span>])
									</div>
																																								
												<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getBasePath" title="details" class="method-name">getBasePath</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getConfig" title="details" class="method-name">getConfig</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getConfigPath" title="details" class="method-name">getConfigPath</a>
										()
									</div>
																								<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setConfig" title="details" class="method-name">setConfig</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$overwrite</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setConfigPath" title="details" class="method-name">setConfigPath</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#_mergeConfig" title="details" class="method-name">_mergeConfig</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$current</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$successor</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__clone" title="details" class="method-name">__clone</a>
										()
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$config" id="$config"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$config</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">59</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds config settings</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodinit" id="init"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method init</span> (line <span class="line-number">115</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class. Also a PHP version check  is being performed to avoid compatibility problems with PHP &lt; 5.1.6</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">object</span>
		<span class="method-name">
			init
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$configPath</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$configPath</span><span class="var-description">: the path to the config file</span>			</li>
				</ul>
		
			
	</div>

<a name="methodgetBasePath" id="getBasePath"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getBasePath</span> (line <span class="line-number">161</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method checks if a base path is given and usage is set to true.</p>
<p class="description"><p>If all that tests succeed the base path will be returned as a string -  else null will be returned.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> the base path or null</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getBasePath
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetConfig" id="getConfig"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getConfig</span> (line <span class="line-number">220</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the config array</p>
	<ul class="tags">
				<li><span class="field">return:</span> the config array</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getConfig
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetConfigPath" id="getConfigPath"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getConfigPath</span> (line <span class="line-number">149</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns path to configuration file</p>
	<ul class="tags">
				<li><span class="field">return:</span> the config path</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getConfigPath
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetConfig" id="setConfig"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setConfig</span> (line <span class="line-number">178</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Merges new settings into the exsiting ones or overwrites them</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setConfig
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$overwrite</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$config</span><span class="var-description">: the config array</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$overwrite</span><span class="var-description">: config overwrite flag</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetConfigPath" id="setConfigPath"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setConfigPath</span> (line <span class="line-number">132</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the path to the configuration file</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception if file not found</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setConfigPath
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span><span class="var-description">: the path to the config</span>			</li>
				</ul>
		
			
	</div>
<a name="method_mergeConfig" id="_mergeConfig"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_mergeConfig</span> (line <span class="line-number">198</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Merge config hashes recursivly</p>
<p class="description"><p>The algorithm merges configuration arrays recursively. If an element is  an array in both, the values will be appended. If it is a scalar in both,  the value will be replaced.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Merged hash</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			_mergeConfig
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$current</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$successor</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$current</span><span class="var-description">: The legacy hash</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$successor</span><span class="var-description">: The hash which values count more when in doubt</span>			</li>
				</ul>
		
			
	</div>
<a name="method__clone" id="__clone"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__clone</span> (line <span class="line-number">103</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Permitting to clone this object</p>
<p class="description"><p>For the sake of correctness of a singleton pattern, this is necessary</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__clone
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>